/*  
*  Sphere.h
*
*  Created by Jesse Schmieg on 02/02/2014.
*  Copyright 2014. All rights reserved.
*
* This file is part of the CS5721 Computer Graphics library (graphicsLibrary).
*
* graphicsLibrary is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* graphicsLibrary is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with graphicsLibrary.  If not, see <http://www.gnu.org/licenses/>.
*/

#pragma
#ifndef __SPHERE_H__
#define __SPHERE_H__ 1

#include <string>

#include "Shape.h"
#include "Shader.h"
#include "Ray.h"

namespace sivelab {

	class Sphere : public Shape {
	private:

		// The center coordinate of the sphere
		Vector3D center;

		// The raidus of the sphere
		float radius;

	protected:

		Sphere(const std::string& _name, const std::string& _type, 
			const Shader& _shader, const Vector3D& _center, const float _radius)
			: Shape(_name, _type, _shader), center(_center), radius(_radius) { }

	public:

		bool intersect(const Ray& ray, float *t0, float *t1);

	};
}

#endif